package main;

import logic.SwingGui;
import server.Server;

/**
 * Created with IntelliJ IDEA.
 * User: nocturne
 * Date: 03.03.13
 * Time: 21:16
 * To change this template use File | Settings | File Templates.
 *
 * Arduino
 *
 int ledPin = 11;
 int ledPin2 = 12;

 void setup() {

 // Create serial object
 Serial.begin(9600);

 pinMode(ledPin, OUTPUT);
 pinMode(ledPin2, OUTPUT);
 }

 void loop() {

 while(Serial.available() == 0);

 int val = Serial.read() - '0';

 if(val == 1) {
 Serial.println("Led is On");
 digitalWrite(ledPin, HIGH);

 } else if(val == 0) {
 Serial.println("Led is Off");
 digitalWrite(ledPin, LOW);


 } else if(val == 2) {
 Serial.println("Led2 is Off");
 digitalWrite(ledPin2, LOW);
 } else if(val == 3) {
 Serial.println("Led2 is On");
 digitalWrite(ledPin2, HIGH);
 } else {
 Serial.println("Error!!!");

 }

 // Вместо Serial.flush();
 delay(20);
 while(Serial.available()>0) Serial.read();

 }
 *
 */
class Main {

    public static void main(String[] args) {
        try {

            //SerialWriter serialWriter = new SerialWriter();
            SwingGui swingGui = new SwingGui();
            //serialWriter.connect("COM20");



            //Server server = new Server(1234);
            //server.start();

        } catch (Exception e) {
            System.out.println(e);
        }
    }

}